import request from '@/utils/request'

// 获取所有 评论数目
export const getCommontsum = (params) => {
  return request('/my/countcomments', 'get', params)
}

// 获取评论
export const getAllcomments = (params) => {
  return request('/my/allcomments', 'get', params)
}

// 添加评论
export const addComment = (query, data) => {
  return request('/my/addcomment', 'post', query, data)
}

// 获取我发布的评论的数目
export const getMycount = (params) => {
  return request('/my/myCountcomments', 'get', params)
}

// 获取我发布的评论
export const myComment = (params) => {
  return request('/my/mycomments', 'get', params)
}

// 评论储存方式为json
export const addLikes = (query, data) => {
  return request('/my/addlike', 'post', query, data)
}

// 删除评论
export const deleteComment = (query, data) => {
  return request('/my/deletecomment', 'post', query, data)
}

// 查询子评论列表 通过数组
export const findsonComment = (query, data) => {
  return request('/my/findsoncomment', 'post', query, data)
}

// 添加子评论接口
export const addsoncomment = (query, data) => {
  return request('/my/addsoncomment', 'post', query, data)
}

// 删除子评论的接口
export const deletesoncomment = (query, data) => {
  return request('/my/deleteSoncomment', 'post', query, data)
}

// 获取官方十条播报
export const getbroadcastMessage = (params, data) => {
  return request('/my/broadcastMessage', 'get', params)
}
